﻿/*------------------------------------------------
// File Description: ProductViaSiteImage DataBase Entity
// Author:			 汪亮
// Create Time:		 2020-05-05 10:31:38
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 过站图片
    /// </summary>
    [Table(nameof(ProductViaSiteImage))]
    public class ProductViaSiteImage : BaseEntity
    {
        private string _barCode = string.Empty;
        private string _image = string.Empty;
        private string _positions = string.Empty;

        #region Public Property

        ///<Summary>
        /// 组件条码
        ///</Summary>
        public string BarCode
        {
            get { return string.IsNullOrWhiteSpace(_barCode) ? string.Empty : _barCode; }
            set { _barCode = value; }
        }

        ///<Summary>
        /// 过站记录ID
        ///</Summary>
        public int ViaSiteId { get; set; }

        ///<Summary>
        /// 站点类型
        ///</Summary>
        public Enum.SiteType SiteType { get; set; }

        ///<Summary>
        /// 图片地址
        ///</Summary>
        public string Image
        {
            get { return string.IsNullOrWhiteSpace(_image) ? string.Empty : _image; }
            set { _image = value; }
        }

        ///<Summary>
        /// 标记位置
        ///</Summary>
        public string Positions
        {
            get { return string.IsNullOrWhiteSpace(_positions) ? string.Empty : _positions; }
            set { _positions = value; }
        }

        ///<Summary>
        /// 图片序号
        ///</Summary>
        public int? SortNo { get; set; }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 过站图片
        /// </summary>
        public virtual DbSet<ProductViaSiteImage> ProductViaSiteImages { get; set; }
    }
}
